﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;

namespace RCloud
{
    /// <summary>
    /// 获取结果的请求
    /// 所在大致位置用IP判断
    /// 传入经纬度可以在某些领域获取更为实用的结果[例如在大街上搜索近且好的实体店]
    /// </summary>
    public class GetRequest : Doo.WebServiceRequest
    {
        /// <summary>
        /// 搜索词
        /// </summary>
        public string SearchWord { get; set; }

        /// <summary>
        /// 经度
        /// </summary>
        public double Long { get; set; }

        /// <summary>
        /// 纬度
        /// </summary>
        public double Lat { get; set; }
    }

    /// <summary>
    /// 项
    /// </summary>
    public class Item
    {
        /// <summary>
        /// 项编号
        /// </summary>
        public Guid ItemID { get; set; }

        /// <summary>
        /// 项标题
        /// </summary>
        public string Title { get; set; }

        /// <summary>
        /// 项描述
        /// </summary>
        public string Description { get; set; }

        /// <summary>
        /// 项照片
        /// </summary>
        public string Photo { get; set; }
    }

    /// <summary>
    /// 发送获取结果
    /// </summary>
    public class GetResponse
    {
        /// <summary>
        /// 项
        /// </summary>
        public Item[] Items { get; set; }
    }

    /// <summary>
    /// 反馈
    /// </summary>
    public class FeedBackRequest
    {
        /// <summary>
        /// 所针对的项
        /// </summary>
        public Guid ItemID { get; set; }

        /// <summary>
        /// 对该项打分
        /// </summary>
        public int Score { get; set; }
    }

    /// <summary>
    /// 推荐服务
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    [System.Web.Script.Services.ScriptService]
    public class service : System.Web.Services.WebService
    {

        [WebMethod]
        public string HelloWorld()
        {
            return "Hello World";
        }

    }
}
